package com.slz3.business.module.instantMessaging.insMessaging.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.instantMessaging.insMessaging.domain.InsMessaging;
import com.slz3.business.module.instantMessaging.insMessaging.domain.InsMessagingCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class InsMessagingResAtomic extends InsMessagingResExecutor {

    public Mono<ServerResponse> add_$InsMessagingUpdateLock(ServerRequest req, InsMessaging insMessaging) {
        return InsMessagingResSafeValid.add(req, insMessaging) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.add(req, insMessaging);
    }

    public Mono<ServerResponse> delete_$InsMessagingUpdateLock(ServerRequest req, InsMessagingCondition insMessagingCondition) {
        return InsMessagingResSafeValid.delete(req, insMessagingCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.delete(req);
    }

    public Mono<ServerResponse> modify_$InsMessagingUpdateLock(ServerRequest req, InsMessaging insMessaging) {
        return InsMessagingResSafeValid.modify(req, insMessaging) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.modify(req, insMessaging);
    }

    public Mono<ServerResponse> info_$InsMessagingUpdateLock(ServerRequest req) {
        return InsMessagingResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.info(req);
    }

    public Mono<ServerResponse> auditSubmit_$InsMessagingUpdateLock(ServerRequest req, InsMessagingCondition insMessagingCondition) {
        return InsMessagingResSafeValid.auditSubmit(req, insMessagingCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditSubmit(req);
    }

    public Mono<ServerResponse> audit_$InsMessagingUpdateLock(ServerRequest req, InsMessagingCondition insMessagingCondition) {
        return InsMessagingResSafeValid.audit(req, insMessagingCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.audit(req);
    }

    public Mono<ServerResponse> auditReject_$InsMessagingUpdateLock(ServerRequest req, InsMessagingCondition insMessagingCondition) {
        return InsMessagingResSafeValid.auditReject(req, insMessagingCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditReject(req);
    }


    public Mono<ServerResponse> usingEnable_$InsMessagingUpdateLock(ServerRequest req, InsMessagingCondition insMessagingCondition) {
        return InsMessagingResSafeValid.usingEnable(req, insMessagingCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingEnable(req);
    }

    public Mono<ServerResponse> usingDisable_$InsMessagingUpdateLock(ServerRequest req, InsMessagingCondition insMessagingCondition) {
        return InsMessagingResSafeValid.usingDisable(req, insMessagingCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingDisable(req);
    }
}
